<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">  
    <script language="javascript">
        	function modify() {
				if(document.getElementById("userName").value == "") {
					alert("请输入用户名");
					return false;
				}
				if(document.getElementById("userName").value.length > 10) {
					alert("用户名不能大于10个字符");
					return false;
				}
				if(document.getElementById("userPw").value == "") {
					alert("请输入密码");
					return false;
				}
				if(document.getElementById("userPw").value.length < 4|| document.getElementById("userPw").value.length > 10) {
					alert("密码长度应在5-8个字符");
					return false;
				}
				if(document.getElementById("useremail").value == "") {
					alert("请输入电子邮箱");
					return false;
				}
				if(document.getElementById("userClass").value == "") {
					alert("请输入所在班级");
					return false;
				}
				return true;
			}
      </script> 
</head>

<body leftmargin="2" topmargin="9" background='<%=path %>/images/allbg.gif'>
	<form action="<%=path %>/servlet/UpdateInfo" name="formAdd" method="post" >
		 <table width="98%" align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px">
			<tr bgcolor="#EEF4EA">
				<td colspan="3" background="<%=path %>/images/wbg.gif" class='title' align='center'><span>学生信息修改</span></td>
			</tr>
				<input type="hidden" name="id" size="20" value="${id}"/>

			<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
						   
				<td width="25%" bgcolor="#FFFFFF" align="right">
					 用户名：
				 </td>
				<td width="75%" bgcolor="#FFFFFF" align="left">
					<input type="text" name="userName" size="20" value="${name}"/>
				</td>
			</tr>
			<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				<td width="25%" bgcolor="#FFFFFF" align="right">
					 密码：
				 </td>
				<td width="75%" bgcolor="#FFFFFF" align="left">
					<input type="text" name="userPw" id="userPw" size="22"  value="${password}"/>
				</td>
			</tr>
			<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				 <td width="25%" bgcolor="#FFFFFF" align="right">
					电子邮箱：
				</td>
				 <td width="75%" bgcolor="#FFFFFF" align="left">
					<input type="text" name="userEmail" id="userEmail" size="22" value="${email}"/>
				</td>
			</tr>
			<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				<td width="25%" bgcolor="#FFFFFF" align="right">
					 所在班级：
				 </td>
				<td width="75%" bgcolor="#FFFFFF" align="left">
					<input type="text" name="userClass" id="userClass" size="22" value="${class}"/>
				</td>
			</tr>
			<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				<td width="25%" bgcolor="#FFFFFF" align="right">
						        &nbsp;
				</td>
				 <td width="75%" bgcolor="#FFFFFF" align="left">
					<input type="submit" value="修改" onClick="return modify()"/>&nbsp; 
					<input type="reset" value="重置"/>&nbsp;
				 </td>
			</tr>
		  </table>
		</form>
   </body>
</html>